<?php defined('IN_ADMIN') or exit('No permission resources.'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" class="addbg">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>预览模型</title>
  <link href="__PUBLIC__/css/admin/reset.css" rel="stylesheet" type="text/css">
  <link href="__PUBLIC__/css/admin/zh-cn-system.css" rel="stylesheet" type="text/css">
  <link href="__PUBLIC__/css/admin/table_form.css" rel="stylesheet" type="text/css">
  <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/admin/style/zh-cn-styles1.css" title="styles1" media="screen">
  <link rel="alternate stylesheet" type="text/css" href="__PUBLIC__/css/admin/style/zh-cn-styles2.css" title="styles2" media="screen">
  <link rel="alternate stylesheet" type="text/css" href="__PUBLIC__/css/admin/style/zh-cn-styles3.css" title="styles3" media="screen">
  <link rel="alternate stylesheet" type="text/css" href="__PUBLIC__/css/admin/style/zh-cn-styles4.css" title="styles4" media="screen">
  <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/JSCal/jscal2.css">
  <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/JSCal/win2k/win2k.css">
  <script type="text/javascript" src="__PUBLIC__/js/admin/jquery.min.js"></script>
  <script type="text/javascript" src="__PUBLIC__/js/admin/jquery.cookie.js"></script>
  <script language="javascript" type="text/javascript" src="__PUBLIC__/js/admin/cookie.js"></script>
  <script type="text/javascript" src="__PUBLIC__/js/admin/styleswitch.js"></script>
  <script type="text/javascript" src="__PUBLIC__/js/admin/admin_common.js"></script>
  <script type="text/javascript" src="__PUBLIC__/js/JSCal/jscal2.js"></script>
  <script type="text/javascript" src="__PUBLIC__/js/JSCal/lang/cn.js"></script>
  <script src="__PUBLIC__/js/admin/jquery.artDialog.source.js?skin=default"></script>
  <script src="__PUBLIC__/js/admin/plugins/iframeTools.source.js"></script>
  <script language="javascript" type="text/javascript" src="__PUBLIC__/js/admin/content_add.js" charset="UTF-8"></script>
  <script language="javascript" type="text/javascript" src="__PUBLIC__/js/admin/formvalidator.js" charset="UTF-8"></script>
  <script language="javascript" type="text/javascript" src="__PUBLIC__/js/admin/formvalidatorregex.js" charset="UTF-8"></script>
  <script type="text/javascript" src="__PUBLIC__/js/ckeditor/ckeditor.js"></script>
  <script type="text/javascript" src="__PUBLIC__/js/admin/attachupload.js"></script>
</head>
<body>
  <div class="addContent">
    <div class="crumbs">当前位置：内容  > 预览模型  > <?php echo $r['name'];?></div>
    <div class="col-right">
      <div class="col-1">
        <div class="content pad-6">
          <?php
          if(is_array($forminfos['senior'])) {
            foreach($forminfos['senior'] as $field=>$info) {
              if($info['isomnipotent']) continue;
              if($info['formtype']=='omnipotent') {
                foreach($forminfos['base'] as $_fm=>$_fm_value) {
                  if($_fm_value['isomnipotent']) {
                    $info['form'] = str_replace('{'.$_fm.'}',$_fm_value['form'],$info['form']);
                  }
                }
                foreach($forminfos['senior'] as $_fm=>$_fm_value) {
                  if($_fm_value['isomnipotent']) {
                    $info['form'] = str_replace('{'.$_fm.'}',$_fm_value['form'],$info['form']);
                  }
                }
              }
              ?>
              <h6><?php if($info['star']){ ?> <font color="red">*</font><?php } ?> <?php echo $info['name']?></h6>
              <?php echo $info['form']; ?><?php echo $info['tips']; ?>
              <?php
            }
          }
          ?>
          <?php if($_SESSION['roleid']==1) { ?>
          <h6>状态</h6>
          <span class="ib" style="width:90px"><label><input type="radio" name="status" value="99" checked/> 发布 </label></span>
          <?php if($workflowid) { ?><label><input type="radio" name="status" value="1" > 审核 </label><?php } ?>
          <?php } ?>
        </div>
      </div>
    </div>
    <div class="col-auto">
      <div class="col-1">
        <div class="content pad-6">
          <table width="100%" cellspacing="0" class="table_form">
            <tbody>
              <?php
              if(is_array($forminfos['base'])) {
                foreach($forminfos['base'] as $field=>$info) {
                  if($info['isomnipotent']) continue;
                  if($info['formtype']=='omnipotent') {
                    foreach($forminfos['base'] as $_fm=>$_fm_value) {
                      if($_fm_value['isomnipotent']) {
                        $info['form'] = str_replace('{'.$_fm.'}',$_fm_value['form'],$info['form']);
                      }
                    }
                    foreach($forminfos['senior'] as $_fm=>$_fm_value) {
                      if($_fm_value['isomnipotent']) {
                        $info['form'] = str_replace('{'.$_fm.'}',$_fm_value['form'],$info['form']);
                      }
                    }
                  }
                  ?>
                  <tr>
                    <th width="80"><?php if($info['star']){ ?> <font color="red">*</font><?php } ?> <?php echo $info['name']?>
                    </th>
                    <td><?php echo $info['form']?>  <?php echo $info['tips']?></td>
                  </tr>
                  <?php
                }
              }
              ?>
            </tbody>
          </table>
        </div>
      </div>
    </div>
  </div>
</div>

<div class="fixed-bottom">
  <div class="fixed-but text-c">
    <div class="button"><input value="保存关闭" type="submit" name="dosubmit" class="cu" style="width:145px;"></div>
    <div class="button"><input value="保存后继续添加" type="submit" name="dosubmit_continue" class="cu" style="width:130px;" title="Alt+X"></div>
    <div class="button"><input value="关闭" type="button" name="close" onclick="close_window()" class="cu" style="width:70px;"></div>
  </div>
</div>
</body>
</html>
<script type="text/javascript">
<!--
//只能放到最下面
$(function(){
  $.formValidator.initConfig({formid:"myform",autotip:true,onerror:function(msg,obj){window.top.art.dialog({id:'check_content_id',content:msg,lock:true,width:'200',height:'50'},   function(){$(obj).focus();
    boxid = $(obj).attr('id');
    if($('#'+boxid).attr('boxid')!=undefined) {
      check_content(boxid);
    }
  })}});
  <?php echo $formValidator;?>

  /*
  * 加载禁用外边链接
  */

  $('#linkurl').attr('disabled',true);
  $('#islink').attr('checked',false);
  $('.edit_content').hide();
})
//-->
</script>